﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Xml.Linq;

namespace MobileWeb.Helpers
{
    public class XmlHelper
    {
        public static XElement GetXmlContent(string url)
        {
            var request = WebRequest.Create(url);
            var response = request.GetResponse();

            var stream = response.GetResponseStream();
            var reader = new StreamReader(stream);

            var xmlContent = reader.ReadToEnd();
            return XElement.Parse(xmlContent);
        }
    }
}